eval(read('/apps/notex.jsx'));
notex.usage('The service settings administration service',
            {username: 'The "admin/service_settings" service username',
             password: 'The "admin/service_settings" service password',
             action: 'The action to perform',
             setting: 'JSON format of a service setting to update or add'});
notex.service.auth('admin/service_settings');

// Setup database options
var options; eval('options=' + read('../options.jsx'));

// Handle service inserts, updates, deletes and selects
var action = param('action') || 'select';
var setting = param('setting'); if (setting) eval('setting=' + setting);
var result = notex.service.orm.action(action, 'service_settings', setting, options);
write(result.toXMLString());

// END
